package cn.com.tuns.assess.qsb.frame.ui;


import cn.com.tuns.assess.qsb.R;
import cn.com.tuns.assess.qsb.frame.util.StrUtil;

public class Config {

  private final static String[] AppUrl=new String[]{
          "http://test-admin.tuns.com.cn/",
          "http://test-admin.tuns.com.cn/",
          "http://test-admin.tuns.com.cn/",
          "https://wp.tuns.com.cn/"
  };
  private final static String[] ProtocolUrl=new String[]{
          "http://test-admin.tuns.com.cn/mobile/app/aboutUs/protocol",
          "http://test-admin.tuns.com.cn/mobile/app/aboutUs/protocol",
          "http://test-admin.tuns.com.cn/mobile/app/aboutUs/protocol",
          "https://wp.tuns.com.cn/mobile/app/aboutUs/protocol"
  };

  private final static String[] WebHomeUrl=new String[]{
          "http://wap-test.tuns.com.cn",
          "http://wap-test.tuns.com.cn",
          "http://172.18.251.109:3030",
          "https://wap.tuns.com.cn"
  };
  public static String getAppUrl(){
    int appType= StrUtil.nullToInt(MyApplication.context.getString(R.string.app_type),1);
    return AppUrl[appType-1]+"api/assess";
  }
  public static String getWebHomeUrl(){
    int appType= StrUtil.nullToInt(MyApplication.context.getString(R.string.app_type),1);
    return WebHomeUrl[appType-1];
  }

  //获取用户协议的地址
  public static String getProtocolUrl(){
    int appType= StrUtil.nullToInt(MyApplication.context.getString(R.string.app_type),1);
    return ProtocolUrl[appType-1];
  }

  public static String getUpdateLogUrl(){
    int appType= StrUtil.nullToInt(MyApplication.context.getString(R.string.app_type),1);
    return AppUrl[appType-1]+"ins/app/client/errorLog";
  }
}
